import instance from "@/utils/request";

export const OA_login = (username,password) => {
    let url = "/system/user/login"
    return instance.post(url,{username, password})
}

export const User_List = (page, page_size, username, nick_name, is_active) => {
    let url = "/system/user/users"
    return instance.get(url, null, {  
        params: { page, page_size, username, nick_name, is_active }
    })
}

export const Delete_User = (del_list) => {
    let url = "/system/user/users"
    return instance.delete(url,{data:del_list})
}

export const add_user = (params) => {
    let url = "/system/user/users"
    return instance.post(url,{...params})
}

export const get_one_user = (id) => {
    let url = "/system/user/user/"+id
    return instance.get(url)
}

export const put_one_user = (id,data) => {
    let url = "/system/user/users/"+id
    return instance.put(url,{...data})
}


export const auth = () => {
    let url = "/system/auth/auth"
    return instance.get(url)
}